﻿Imports System.Configuration
Imports System.Windows



Partial Public Class Configurator
    Implements iConverter.Contracts.IPluginConfigurator

    Private Property Settings As My.MySettings

    Public Sub Load(Settings As System.Configuration.ApplicationSettingsBase) Implements iConverter.Contracts.IPluginConfigurator.Load
        Me.Settings = TryCast(Settings, My.MySettings)

    End Sub

    Public Sub Unload(Settings As System.Configuration.ApplicationSettingsBase) Implements iConverter.Contracts.IPluginConfigurator.Unload
        Me.Settings = Nothing
    End Sub


    ''' <summary>
    ''' 浏览
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub btn_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btn.Click 

        Dim dlg As New Microsoft.Win32.OpenFileDialog()
        dlg.FileName = "foobar2000.exe"
       
        dlg.Filter = "程序文件(*.exe)|*.exe"

        If dlg.ShowDialog Then
            Me.Settings.FoobarPath  = dlg.FileName
        End If


    End Sub
End Class
